<template>

        <div class="block">

            <el-pagination
                    layout="prev, pager, next"
                    :total=all_page
                    :page-count="12"
                    @current-change="change_page"
            >
            </el-pagination>
        </div>

</template>

<script>

    export default  {
        data() {
            return {
                input: '',
                select: '',
                page:''
            }
        },
        name: 'Pagination',
        props: {
            all_page:Number
        },
        created() {


        },
        methods:{
            change_page: function (val) {
                this.page = val;
                this.$store.dispatch("getCommodityData", {page: (this.page - 1) * 12, pageSize: 12})


            }
        }
    }
</script>

<style>
    .el-select .el-input {
        width: 130px;
    }
    .input-with-select .el-input-group__prepend {
        background-color: #fff;
    }
</style>